//6.观察者模式之http
let http = require('http');
let server = http.createServer();
server.on('request',(req,rea)=>{
    req.on('data',(data)=>{
        console.log(data);
    })
    req.on('end',(data)=>{
        console.log('ok');
    })
})